package com.hopu.v1.service.admin.subject.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hopu.v1.mapper.admin.subject.ACourseMapper;
import com.hopu.v1.pojo.course.Course;
import com.hopu.v1.pojo.system.Class;
import com.hopu.v1.service.admin.subject.ACourseService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ACourseServiceImpl extends ServiceImpl<ACourseMapper, Course> implements ACourseService {

    @Resource
    private ACourseMapper ACourseMapper;

    @Override
    public List<Course> getCourseList(Integer subjectId) {
        return ACourseMapper.getCourseList(subjectId);
    }

    /**
     * 查询班级的进度
     * @param classId
     * @param pid
     * @param status
     * @return
     */
    @Override
    public List<Course> selectAllCourseByClassId(Integer classId, Integer pid, Integer status,Integer subjectId) {
        return ACourseMapper.selectAllCourseByClassId(classId,pid,status,subjectId);
    }

    /**
     * 查询班级的进度
     * @param classId
     * @return
     */
    @Override
    public List<Course> selectCourseByClassId(Integer classId) {
        return ACourseMapper.selectCourseByClassId(classId);
    }

    /**
     * 查询子课程
     * @param pid
     * @return
     */
    @Override
    public List<Course> selectChildCourse(Integer pid) {
        return ACourseMapper.selectChildren(pid);
    }

}
